/* Cookie dialog */

.mega-dialog.cookie-dialog {
    max-height: calc(100% - 30px);
    max-width: 640px;
    text-align: center;
    width: calc(100% - 30px);
    z-index: 9999!important;
}
.cookie-dialog .content-block {
    border-radius: var(--border-radius);
    display: none;
    flex-direction: column;
    font-size: 0;
    min-height: 0;
    width: 100%;
}
.cookie-dialog .content-block.active {
    display: flex;
}
.cookie-dialog .scrollable-block {
    padding: 0 48px;
    overflow: auto;
    position: relative;
    -webkit-overflow-scrolling: touch;
}
.mobile .cookie-settings-sheet .main.centered {
    padding-inline: 24px 0;
    width: calc(100% - 24px);
}
.mobile .cookie-dialog .step2 {
    padding-inline-end: 24px;
}
.cookie-dialog .step2 .scrollable-block {
    padding: 0 30px;
}

/* Bottom buttons bar */
.cookie-dialog .bottom-buttons {
    background: var(--surface-grey-1);
    border-bottom-right-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
    padding: 24px 48px;
    position: relative;
}
.cookie-dialog .step2 .bottom-buttons {
    padding: 14px 30px;
    height: 60px;
}
.rtl .cookie-dialog .bottom-buttons .right {
    float: left;
}
.rtl .cookie-dialog .bottom-buttons .left {
    float: right;
}
.cookie-dialog .bottom-buttons button {
    margin-inline-start: 8px;
}
.cookie-dialog .bottom-buttons button.left {
    margin: 0;
    margin-inline-end: 8px;
}

/* Cookies banner */
.mega-banner-template.cookie-banner .content {
    min-height: 92px;
}

.mega-banner-template.cookie-banner .header-container {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}
.mobile .mega-banner-template.cookie-banner .header-container {
    align-items: center;
}


.mega-banner-template.cookie-banner .reject-all {
    width: max-content;
    margin: 12px 0 24px;
    text-decoration: underline;
    cursor: pointer;
}
.mobile .mega-banner-template.cookie-banner .reject-all {
    margin: 8px 0 32px;
}

/* Step 1. Common info */
.cookie-dialog .scrollable-block.big-pad {
    padding: 62px 50px;
}
.cookie-dialog .cookie-icon {
    margin: 0 auto;
    width: 120px;
    --width: 120px;
    height: 120px;
}
.cookie-dialog .header {
    font: var(--text-h2);
    color: var(--text-color-high);
    padding: 24px 0 0 0;
}
.cookie-dialog .common-info {
    font: var(--text-body1);
    color: var(--text-color-medium);
    padding: 30px 0 0 0;
}
.cookie-dialog a.green,
.cookie-dialog a.green:visited {
    color: var(--text-color-success);
    overflow-wrap: break-word;
}

/* Step 2. Cookie Settings */
.cookie-dialog .header.medium {
    font: var(--text-h2);
    padding: 12px 0;
}
.cookie-dialog .step2 .header.medium {
    font: var(--text-h3);
    padding: 29px 0 0 0;
}
.cookie-dialog .settings-tip {
    color: var(--text-color-low);
    display: none;
    font-size: 13px;
    line-height: 20px;
    padding: 0 24px;
    margin: -22px auto 10px auto;
    max-width: 478px;
}
.cookie-dialog .step2 .settings-tip {
    margin-top: 7px;
}
.cookie-dialog .settings {
    border-collapse: collapse;
    display: table;
    width: 100%;
}
.cookie-dialog .settings-row {
    display: table-row;
    border-top: 1px solid var(--stroke-grey-2);
}
.cookie-dialog .settings-row[data-type="::all"] {
    border-top: none;
}
.cookie-dialog .settings-row.hidden {
    display: none;
}
.cookie-dialog .settings-row:first-child {
    border: 0;
}
.cookie-dialog .settings-cell {
    display: table-cell;
    line-height: 0;
    padding: 12px 0;
}
.cookie-dialog .settings-cell:first-child {
    text-align: start;
    vertical-align: bottom;
}
.cookie-dialog .settings-cell.saved {
    background: var(--surface-grey-1);
    display: none;
}
.cookie-dialog .settings-header {
    color: var(--text-color-high);
    font-family: var(--text-font-family);
    font-weight: 600;
    font-size: 15px;
    line-height: 22px;
}
.cookie-dialog .settings-text {
    color: var(--text-color-low);
    font-size: 14px;
    line-height: 22px;
    padding: 10px 0 0 0;
}
.cookie-dialog .settings-cell a,
.cookie-dialog .settings-cell a:active {
    color: var(--text-color-low);
    display: inline-block;
    font-size: 14px;
    line-height: 22px;
    margin: 4px 0;
    text-decoration: underline;
}
.cookie-dialog .settings-cell a:visited {
    color: var(--text-color-low);
}
.cookie-dialog .toggle-header {
    color: var(--text-color-high);
    display: none;
    font-size: 14px;
    font-family: var(--text-font-family);
    font-weight: 600;
    line-height: 17px;
    min-width: 82px;
    padding: 2px 10px 10px;
}
.rtl .cookie-dialog .mega-switch,
.cookie-dialog .mega-switch {
    float: none;
}
.cookie-dialog .mega-switch.disabled {
    opacity: 0.5;
    cursor: default;
}
.cookie-dialog .settings-links {
    margin: 10px 0 48px 0;
}
.cookie-dialog a.settings-link {
    color: var(--text-color-medium);
    margin: 10px 0 0;
    margin-inline-end: 25px;
    font-family: var(--text-font-family);
    font-weight: 600;
}
.cookie-dialog a.settings-link:visited {
    color: var(--text-color-medium);
}
.cookie-dialog a.settings-link:active,
.cookie-dialog a.settings-link:visited {
    margin-right: 25px;
}
.cookie-dialog a.settings-link:last-child {
    margin-inline-end: 0;
}
.cookie-dialog .tabs {
    display: none;
    font-size: 0;
    padding: 5px 0 0 0;
    white-space: nowrap;
}
.cookie-dialog .settings-tab {
    color: var(--text-color-medium);
    background: var(--surface-grey-1);
    display: inline-block;
    font-size: 14px;
    height: 44px;
    line-height: 44px;
    vertical-align: top;
    width: 50%;
}
.cookie-dialog .settings-tab.active {
    border-bottom: 2px solid var(--stroke-success);
    color: var(--text-color-success);
    font-family: var(--text-font-family);
    font-weight: 600;
}

/* Visible Saved settings */
/* Show "Current"/"Saved" headers, Show tip about Saved settings. */
.active-saved-cookies .toggle-header,
.active-saved-cookies .settings-tip {
    display: block;
}
.active-saved-cookies .settings-cell.saved {
    display: table-cell;
}

/* Mobile devices */

.mobile .mega-dialog.cookie-dialog {
    background: none;
    border-radius: 0;
    box-shadow: none;
    max-height: none;
    max-width: none;
    width: 100%;
}
.mobile .cookie-dialog .content-block {
    background: none;
    border-radius: 0;
}
.mobile .cookie-dialog .scrollable-block {
    padding: 0;
}
.mobile .cookie-dialog .header.medium {
    color: var(--mobile-text-primary);
    font: var(--mobile-font-heading-h1);
    margin: 0;
    padding: 0;
    text-align: start;
}
.mobile .cookie-dialog .settings-links {
    display: flex;
    flex-direction: column;
    margin: 0;
    width: fit-content;
}
.mobile .cookie-dialog .settings-links a,
.mobile .cookie-dialog .settings-links a:visited,
.mobile .cookie-dialog .settings-links a:hover,
.mobile .cookie-dialog .settings-links a:active {
    font: var(--mobile-font-copy-regular);
    color: var(--mobile-link-primary);
    text-decoration: underline;
    margin: 24px 0 0;
}
.mobile .cookie-dialog .settings-tip {
    font: var(--mobile-font-copy-regular);
    color: var(--mobile-text-primary);
    padding: 0;
    margin: 24px 0 0;
    max-width: unset;
    text-align: start;
}
.mobile .cookie-dialog .tabs {
    padding: 24px 0;
    margin: 0;
}
.mobile .cookie-dialog .settings-tab {
    font: var(--mobile-font-copy-regular);
    color: var(--mobile-text-primary);
    background-color: var(--mobile-button-secondary);
    border-radius: 8px;
    height: auto;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    white-space: normal;
}
.mobile .cookie-dialog .settings-tab.active {
    background-color: var(--mobile-button-primary);
    color: var(--mobile-text-inverse-accent);
}
.mobile .cookie-dialog .settings-text {
    font: var(--mobile-font-copy-regular);
    color: var(--mobile-text-primary);
}
.mobile .cookie-dialog .settings-row {
    border: none;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-top: 24px;
}
.mobile .cookie-dialog .settings-cell {
    padding: 0;
}
.mobile .cookie-dialog .settings-cell + * {
    padding-inline-start: 8px;
}
.mobile .cookie-dialog .settings-header {
    font: var(--mobile-font-heading-h3);
}
.mobile .cookie-dialog .toggle-header {
    display: none;
}
.mobile .cookie-dialog .settings-cell.saved {
    background-color: transparent;
}
.mobile .active-saved-cookies .tabs {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 24px 0 0;
}
.mobile .cookie-dialog .bottom-buttons {
    background: none;
    border-radius: 0;
    padding: 24px 0 0;
    height: unset;
    text-align: start;
}
.mobile .cookie-banner {
    background: none;
    box-shadow: none;
    position: unset;
    width: 100%;
}
.mobile .cookie-banner > .content {
    flex-direction: column;
    padding: 0;
    font: var(--mobile-font-copy-regular);
}
.mobile .cookie-banner h3 {
    display: none;
}
.mobile .mega-banner-template.cookie-banner p {
    font: var(--mobile-font-copy-regular);
    color: var(--mobile-text-primary);
    margin-bottom: 24px;
}
.mobile .mega-banner-template.cookie-banner a {
    color: var(--mobile-link-primary);
    text-decoration: underline;
}
.mobile .cookie-banner .buttons {
    flex-direction: column;
    margin: 0 auto;
    width: 100%;
    max-width: var(--mobile-elem-max-width);
    align-items: center;
}
.mobile .cookie-banner .buttons .mega-button,
.mobile .cookie-dialog .bottom-buttons .mega-button {
    background: var(--mobile-button-secondary);
    border-radius: 8px;
    box-shadow: none;
    display: flex;
    font: var(--mobile-font-link-large-regular);
    font-weight: var(--mobile-font-weight-semibold);
    float: none;
    height: 48px;
    order: 1;
    margin-top: 16px;
    max-width: var(--mobile-elem-max-width);
    width: 100%;
}
.mobile .cookie-banner .buttons .mega-button.positive,
.mobile .cookie-dialog .bottom-buttons .mega-button.positive {
    background: var(--mobile-button-primary);
    color: var(--mobile-text-inverse-accent);
    order: 0;
    margin: 0;
}

/* Low resolution displays */

@media only screen and (max-width: 625px), screen and (max-height: 625px) {

    /* Cookie dialog. Step 1. */
    .cookie-dialog .header,
    .cookie-dialog .header.medium {
        font-family: var(--text-font-family);
        font-weight: 600;
        font-size: 17px;
    }
    .cookie-dialog .common-info {
        font-size: 14px;
        padding: 15px 0 0 0;
    }

    /* Cookie dialog. Step 2. Cookie settings. */
    .cookie-dialog .header.medium {
        padding: 18px 0;
    }
    .cookie-dialog .settings-tip {
        margin-top: -14px;
    }
    .cookie-dialog .settings-header {
        color: var(--text-color-high);
        font-size: 14px;
    }
    .cookie-dialog .settings-row:first-child .settings-cell {
        padding: 12px 0;
    }
    .cookie-dialog .settings-text {
        color: var(--text-color-medium);
        font-size: 13px;
        line-height: 16px;
        padding: 7px 0 0 0;
    }
    .cookie-dialog .settings-cell a,
    .cookie-dialog .settings-cell a:active {
        font-size: 13px;
        line-height: 17px;
    }

    /* Step 3. Third Party Cookies */
    .cookie-dialog .info-block {
        font-size: 12px;
        line-height: 18px;
        padding: 10px 0 52px 0;
        text-align: center;
    }
    .cookie-dialog .header.small {
        font-size: 14px;
        padding: 0 0 5px 0;
    }
    .cookie-dialog .info-block .category {
        color: var(--text-color-high);
        font-size: 13px;
        padding: 0 0 16px 0;
    }
}

/* Hover states */
@media (hover: hover) {
    .cookie-dialog a:hover,
    .cookie-banner .buttons a:hover {
        text-decoration: none;
    }
}
